﻿using System.Collections.Generic;
using VMukti.Business.CommonDataContracts;

namespace VMukti.Business.WCFServices.BootStrapServices.NetP2P
{    
    public class ClsNetP2PConsoleDelegates : INetP2PConsoleService
    {
        public delegate void DelsvcNetP2PConsoleJoin(string uName);
        public delegate void DelsvcNetP2PConsoleSendMsg(string msg);
        public delegate void DelsvcNetP2PConsoleUnJoin(string uName);

        public event DelsvcNetP2PConsoleJoin EntsvcNetP2PConsoleJoin;
        public event DelsvcNetP2PConsoleSendMsg EntsvcNetP2PConsoleSendMsg;
        public event DelsvcNetP2PConsoleUnJoin EntsvcNetP2PConsoleUnJoin;

        #region INetP2PConsoleService Members

        public void svcNetP2ConsoleJoin(string uName)
        {
            if (EntsvcNetP2PConsoleJoin != null)
            {
                EntsvcNetP2PConsoleJoin(uName);
            }
        }

        public void svcNetP2ConsoleSendMsg(string msg)
        {
            if (EntsvcNetP2PConsoleSendMsg != null)
            {
                EntsvcNetP2PConsoleSendMsg(msg);
            }
        }

        public void svcNetP2PConsoleUnJoin(string uName)
        {
            if (EntsvcNetP2PConsoleUnJoin != null)
            {
                EntsvcNetP2PConsoleUnJoin(uName);
            }
        }

        #endregion
    }
}
